# coding = utf-8
class Dog(object):
    name = "3333"

    def __init__(self, name):
        self.name = name

    @property   # 把一个方法变成一个属性
    def eat(self):
        print("name is %s" % self.name)

    @eat.setter   # 把一个方法变成一个属性
    def eat(self):
        print("name is %s" % self.name)


a = Dog("liudehua")
a.eat





